import request from '@/utils/request';

// 查询积分商品列表
export function listIntegralGoods(query) {
	return request({
		url: '/mall/integral/goods/list',
		method: 'post',
		data: query,
	});
}

// 查询积分商品详细
export function getIntegralGoods(id) {
	return request({
		url: '/mall/integral/goods/getInfo',
		method: 'post',
		data: id,
	});
}

// 新增积分商品
export function addIntegralGoods(data) {
	return request({
		url: '/mall/integral/goods/add',
		method: 'post',
		data: data,
	});
}

// 编辑积分商品
export function updateIntegralGoods(data) {
	return request({
		url: '/mall/integral/goods/edit',
		method: 'post',
		data: data,
	});
}

// 删除积分商品
export function delIntegralGoods(id) {
	return request({
		url: '/mall/integral/goods/remove',
		method: 'post',
		data: id,
	});
}

// 导出积分商品
export function exportIntegralGoods(query) {
	return request({
		url: '/mall/integral/goods/export',
		method: 'post',
		params: query,
	});
}

export const updateIntegralGoodsPo = (data) => {
	return request({
		url: '/mall/integral/goods/updateGoodsPo',
		method: 'post',
		data: data,
	});
};
